#pragma once
#include <string>
#include <time.h>

namespace TimeUtils
{
  time_t convertTimeStr2TimeStamp(std::string format, std::string timeStr)
  {
    struct tm timeinfo;
    strptime(timeStr.c_str(), format.c_str(), &timeinfo);
    time_t timeStamp = mktime(&timeinfo);
    // printf("timeStamp=%ld\n",timeStamp);
    return timeStamp;
  }

};